﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
        try {
            var hash = document.location.hash.substring(1);  //解析hash得到access_token值。
            //alert(hash);
            //var hash = 'access_token=2.0046w9OCwUCZUBaffa625ba70fulNN&expires_in=86400&remind_in=80031&uid=2046032077';
           // var url = 'GateService.aspx?op=0&' + hash;
            $.ajax({
                type: "GET",
                url: "GateService.aspx",
                dataType: "text",
                async: false,
                data: "op=0&" + hash+"&random="+ new Date().toLocaleString(),
                beforeSend: function (xmlHttpRequest) {
                },
                success: function (data, textStatus) {
                    //alert(data);
                    if (parseInt(data) == 1) {
                        window.opener.sendToActionScript();
                        window.close();
                    }

                },
                complete: function (xmlHttpRequest, textStatus) {

                },
                error: function () {
                    alert("error");
                }
            });
        }
        catch (e) {
            alert("exception: " + e.Message);
        }
        
       
    </script>
</head>
<body>
<div id="xmlss"></div>
</body>
</html>
